package com.sxf.common.exceptions;

import com.sxf.common.enums.SystemCommonCode;
import org.apache.http.HttpStatus;

/**
 * 非法传参异常.
 *
 * @author hanzhiwei
 * @version 1.0
 * @title IllegalParameterException
 * @description 非法传参异常.
 * @date 2016年10月19日
 */
public class IllegalParameterException extends BaseRuntimeException {
    private static final long serialVersionUID = -6277013304097552489L;

    public IllegalParameterException() {
        super("Illegal Parameter");
    }

    public IllegalParameterException(String errMsg) {
        super(errMsg);
    }

    public IllegalParameterException(Throwable cause) {
        super(cause);
    }

    @Override
    public int getErrorCode() {
        return SystemCommonCode.ILLEGL_PARAM_ERR;
    }

    @Override
    public int getHttpStatus() {
        return HttpStatus.SC_BAD_REQUEST;
    }
}
